package com.way;

/**
 * @author 魏彪
 */
public class Context {
    private static final IState STATE_A = new StateA();
    private static final IState STATE_B = new StateB();

    private IState currentState = STATE_A;

    public void setState(IState state) {
        this.currentState = state;
    }

    public void handle() {
        this.currentState.handle();
    }
}
